package com.vca.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.vca.common.model.course.Course;
import com.vca.common.model.course.CourseScheduling;
import com.vca.common.model.exhibition.ExhibitionScheduling;
import com.vca.common.model.order.StoreOrder;
import com.vca.common.model.talk.Talk;
import com.vca.common.model.talk.TalkScheduling;
import com.vca.common.model.user.User;
import com.vca.common.page.CommonPage;
import com.vca.common.request.*;
import com.vca.common.response.ComputedOrderCommonPriceResponse;
import com.vca.common.response.ExhibitionResponse;
import com.vca.common.response.PreOrderCommonResponse;
import com.vca.common.response.StoreOrderDetailResponse;
import com.vca.common.vo.MyRecord;
import com.vca.common.vo.VcaProductStockVo;

import java.util.HashMap;
import java.util.List;

/**
 * VcaOrderService 接口
 */
public interface VcaOrderService extends IService<StoreOrder> {

    /**
     * @Description:预下单
     * @Author: chenBing
     * @Date: 2022/11/21
     */
    MyRecord proOrderCommon(String language,PreOrderCommonRequest request);

    /**
     * @Description:加载预下单
     * @Author: chenBing
     * @Date: 2022/11/22
     */
    PreOrderCommonResponse loadPreCommon(String language,String preOrderNo);

    /**
     * @Description:计算订单价格
     * @Author: chenBing
     * @Date: 2022/11/22
     */
    ComputedOrderCommonPriceResponse computedCommonPrice(String language,ComputedOrderCommonPriceRequest request);

    /**
     * @Description:创建订单
     * @Author: chenBing
     * @Date: 2022/11/23
     */
    MyRecord createCommonOrder(String language,CreateCommonOrderRequest request);

    /**
     * 列表（PC）
     *
     * @param request          请求参数
     * @param pageParamRequest 分页类参数
     * @return CommonPage<StoreOrderDetailResponse>
     */
    CommonPage<StoreOrderDetailResponse> getAdminList(StoreOrderSearchRequest request, PageParamRequest pageParamRequest);

    /**
    * @Description:赠送课程/讲座/展览
    * @Author: chenBing
    * @Date: 2022/11/24
    */
    boolean send(GiveAwayToUserRequest request);

    HashMap<String, Object> getAddressInfoMap(String language,Integer addressId);

    /**
     *@Description:判断用户是否预约过当前课程的排期
     *@author:chenbing
     *@date 2022/11/28 16:35
     */
    HashMap<String, Object> checkPersonAppointment(User user, Course course, CourseScheduling courseScheduling, Integer orderTypeCourse, Long coursePackageId);

    /**
     *@Description:判断用户是否预约过当前展览的排期
     *@author:chenbing
     *@date 2022/11/28 18:50
     */
    HashMap<String, Object> checkPersonAppointmentExhibition(User user, ExhibitionResponse exhibitionResponse, ExhibitionScheduling exhibitionScheduling, Integer orderTypeExhibition);

    /**
     *@Description:判断用户是否预约过当前讲座的排期
     *@author:chenbing
     *@date 2022/11/28 19:04
     */
    HashMap<String, Object> checkPersonAppointmentTalk(User user, Talk talk, TalkScheduling talkScheduling, Integer orderType);

    /**
     *@Description:领取课程/讲座/展览/套课
     *@author:chenbing
     *@date 2022/12/1 19:17
     */
    boolean get(List<Integer> orderInfoIds);

    /**
     *@Description:根据主订单号获取订单
     *@author:chenbing
     *@date 2022/12/2 13:22
     */
    List<StoreOrder> getOrderByMainOrderId(String mainOrderId);

    /**
     * @Description:回滚库存
     * @author:chenbing
     * @date 2022/12/30 15:10
     */
    VcaProductStockVo rollBackStock(StoreOrder storeOrder);

    /**
     *@Description:活动开始通知
     *@author:chenbing
     *@date 2022/12/30 16:40
     */
    void activityStartPushMessage();

    void generateMessageRoutineCollection(HashMap<String, String> messageMap, Integer buyer, Integer lecturer, Integer routineId, String s);

    void generateMessageRoutineSingle(HashMap<String, String> messageMap, Integer userId, Integer routineId, String pageUrl);

    HashMap<String, Object> checkPersonAppointmentExhibitionBySchedulingId(User user, ExhibitionResponse exhibitionResponse, List<Long> schedulingIds, Integer orderTypeExhibition);
}
